package cn.com.connected.common.task;

import cn.com.connected.service.impl.WeChatMessageServiceImpl;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

@Slf4j
public class TaskSendMessage implements Runnable {
    private String openid;
    private String tempid;
    private Map body;


    public TaskSendMessage(String openid,String tempid,Map body) {
        this.openid = openid;
        this.tempid = tempid;
        this.body = body;
    }

    @Override
    public void run() {
        try{
            WeChatMessageServiceImpl.weChatMessageService.pushMessage(openid, tempid, body);
        }catch (Exception e){
            log.error(e.getMessage());
        }

    }
}